# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-autoar
pkgver=0.2.3
pkgrel=1
pkgdesc="Automatic archives creating and extracting library"
url="https://wiki.gnome.org/TingweiLan/GSoC2013Final"
arch=(x86_64)
license=(LGPL)
depends=(glib2 libarchive gtk3)
makedepends=(intltool git gobject-introspection gnome-common gtk-doc vala)
_commit=36c63bd0f0fce9412f5a495a062bd1520ffbaf1f  # tags/0.2.3^0
source=("git+https://git.gnome.org/browse/gnome-autoar#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
